import Axios from '@/utils/request';

/**
 * 条目概况
 */
export function getStateSurvey() {
    return Axios.get('/maintenance/entry/state/survey');
}

/**
 * 条目配置参数概况
 */
export function getEntryConfig() {
    return Axios.get('/maintenance/entry/config/param/survey');
}

/**
 * 特殊计算&分母概况
 * 1-特殊计算 2-分母
 */
export function querySpecialurvey(type: string): Promise<any> {
    return Axios({
        url: '/maintenance/special/survey',
        method: 'post',
        data: {
            type: type,
        },
    });
}

/**
 * 特殊计算&分母概况-明细-条目
 * 1：特殊计算  2：分母
 */
export function querySpecialEntry(data: any): Promise<any> {
    return Axios({
        url: '/maintenance/special/entry',
        method: 'post',
        data: data,
    });
}

/**
 * 动态维度模板
 */
export function getDyTemplateSurvey(): Promise<any> {
    return Axios.get('/maintenance/dyTemplate/survey');
}

/**
 * 动态维度
 */
export function getDySurvey(): Promise<any> {
    return Axios.get('/maintenance/dynamic/survey');
}

/**
 * 动态维度&动态维度模板-明细-条目
 * 1:动态维度  2：动态维度模板
 */
export function queryDynamicEntry(data: any): Promise<any> {
    return Axios({
        url: '/maintenance/dynamic/entry',
        method: 'post',
        data: data,
    });
}

/**
 * 条目同步概况
 */
export function getSyncSurvey(): Promise<any> {
    return Axios.get('/maintenance/entry/sync/survey');
}

/**
 * 条目同步走势
 */
export function querySyncTrend(data: any): Promise<any> {
    return Axios({
        url: '/maintenance/entry/sync/trend',
        method: 'post',
        data: data,
    });
}

/**
 * 条目同步参数
 */
export function querySyncParam(date: string): Promise<any> {
    return Axios({
        url: '/maintenance/entry/sync/param',
        method: 'post',
        data: {
            date: date,
        },
    });
}

/**
 * 条目状态-明细
 */
export function queryStateDetail(data: any): Promise<any> {
    return Axios({
        url: '/maintenance/entry/state/detail',
        method: 'post',
        data: data,
    });
}

/**
 * 条目配置参数-明细
 */
export function queryEntryConfigDetail(data: any): Promise<any> {
    return Axios({
        url: '/maintenance/entry/config/param/detail',
        method: 'post',
        data: data,
    });
}

/**
 * 特殊计算&分母概况-明细
 */
export function querySpecialDetail(data: any): Promise<any> {
    return Axios({
        url: '/maintenance/special/detail',
        method: 'post',
        data: data,
    });
}

/**
 * 动态维度模板-明细
 */
export function queryDyTemplateDetail(data: any): Promise<any> {
    return Axios({
        url: '/maintenance/dyTemplate/detail',
        method: 'post',
        data: data,
    });
}

/**
 * 动态维度-明细
 */
export function queryDyDetail(data: any): Promise<any> {
    return Axios({
        url: '/maintenance/dynamic/detail',
        method: 'post',
        data: data,
    });
}

/**
 * 条目同步概况-明细
 */
export function querySyncDetail(data: any): Promise<any> {
    return Axios({
        url: '/maintenance/entry/sync/detail',
        method: 'post',
        data: data,
    });
}

/**
 * 条目同步走势-明细
 */
export function querySyncTrendDetail(data: any): Promise<any> {
    return Axios({
        url: '/maintenance/entry/sync/trend/detail',
        method: 'post',
        data: data,
    });
}

/**
 * 条目同步参数-明细
 */
export function querySyncParamDetail(data: any): Promise<any> {
    return Axios({
        url: '/maintenance/entry/sync/param/detail',
        method: 'post',
        data: data,
    });
}

/**
 * 查询刷新频率
 */
export function getFrequency(): Promise<any> {
    return Axios.get('/maintenance/module/refresh');
}

/**
 * 条目配置参数映射类型
 */
export function getMappingType(): Promise<any> {
    return Axios.get('/maintenance/entry/config/param/mappingType');
}
